package com.pci.netty.handler;

import com.pci.netty.dto.RequestPayload;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class EchoServerHandler extends SimpleChannelInboundHandler<RequestPayload> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, RequestPayload msg) throws Exception {
        System.out.println("服务端收到消息内容为：" + msg.getData());
        ctx.fireChannelRead(msg);
    }
}
